package LABS.lab7;

/**************************************************************
* Class Recursion
* @author Jeff Thomas - Thomas007
* @vesion 1.0.0
* Date: 03.17.2008
* Copyright 2008, Jeff Thomas
***************************************************************/
public class Recursion
{
	public static void main(String[] args)
	{
		printReverse("hello");
	}
/**************************************************************
* Stutter
* @param message - String to apply a stutter
* @return - Stuttered string, hello => hheellllo
* Task:	1. If message is only 1 character, stutter it
*			2.	Traverse each character and recursively call stutter
* Side Effects: None
***************************************************************/	
	public static void printReverse(String str)
	{
		if (str == null || str.equals("")) {
      	return;
   	}
   	else {
      	printReverse(str.substring(1));
      	System.out.print(str.charAt(0));
    	}
	}
}